package com.dapeis.web.wx.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.google.gson.JsonElement;

/**
 * @author 作者 E-mail: hzyuanyong@126.com
 * @version 创建时间：2017年5月11日 下午10:17:54 类说明
 */
public interface ICommentController {

    /**
     * 订单评论
     * 
     * @param orderId
     * @param score
     * @param content
     * @param request
     * @return
     */
    @RequestMapping(value = "/add", method = RequestMethod.POST)
    public @ResponseBody JsonElement addComment(@RequestParam Long orderId,
	    @RequestParam String score, @RequestParam String content,
	    HttpServletRequest request);

    /**
     * 方案评论
     * 
     * @param planId
     * @param content
     * @return
     */
    @RequestMapping(value = "/plan", method = RequestMethod.POST)
    public @ResponseBody JsonElement plan(@RequestParam Integer planId,
	    @RequestParam String content, HttpServletRequest request);

    /**
     * 获取评论列表
     * @param planId
     * @param currentPager
     * @param request
     * @return
     */
    @RequestMapping(value = "/getPlan")
    public @ResponseBody JsonElement getCommentByPlan(
	    @RequestParam Integer planId,
	    @RequestParam(required = false) Integer currentPager,
	    HttpServletRequest request);
}
